package com.laoluo.erp.struts.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.laoluo.erp.domain.Trade;
import com.laoluo.erp.service.TradeService;
import com.opensymphony.xwork2.ActionSupport;

@Component
public class TradeAction extends ActionSupport {
	private static final long serialVersionUID = -973535478139284299L;
	
	@Resource(name="tradeServiceImpl")
	private TradeService tradeService;
	
	private Trade trade;
	private List<Trade> list;
	
	public String Hello()
	{
		list = tradeService.findAll();
		return "success";
	}

    public List<Trade> GetAll() {	
       List<Trade> list = tradeService.findAll();
       return list;
    }
	
	public Trade getTrade() {
		return trade;
	}

	public void setTrade(Trade trade) {
		this.trade = trade;
	}

	public List<Trade> getList() {
		return list;
	}

	public void setList(List<Trade> list) {
		this.list = list;
	}

	
}
